package org.dromara.oce.domain.base;

import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.dromara.common.core.exception.ServiceException;
import org.dromara.common.core.utils.ObjectUtils;

@Data
public class OceBaseReq {

    /**
     * 账号id
     */
    @NotNull(message = "管家账号不能为空")
    private Long accountId;


    /**
     * 广告主ID
     */
    @NotNull(message = "广告主账号不能为空")
    private Long advertiserId;

    public void checkParam(){
        if(ObjectUtils.isEmpty(accountId)){
            throw new ServiceException("管家账号id不能为空");
        }
        if (ObjectUtils.isEmpty(advertiserId)) {
            throw new ServiceException("广告主id不能为空");
        }
    }

}
